/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.xd.service;

import java.util.Collection;
import java.util.List;

import com.xy.biz.fd.domain.req.folder.ListFolderRequest;
import com.xy.biz.xd.domain.bo.DocumentReleaseCheckBO;
import com.xy.biz.xd.domain.req.GetDocumentReleaseCheckStatusRequest;
import com.xy.biz.xd.domain.req.ListDocumentByTypeRequest;
import com.xy.biz.xd.domain.req.SaveDocumentReleaseReceiveRequest;
import com.xy.biz.xd.domain.req.SignDocumentReleaseRequest;
import com.xy.biz.xd.domain.req.documentRelease.ListDocumentReleaseRequest;
import com.xy.biz.xd.domain.resp.GetDocumentReleaseStatusResponse;
import com.xy.lang.domain.Result;
import com.xy.biz.xd.domain.bo.DocumentReleaseBO;
import com.xy.biz.xd.domain.query.DocumentReleaseQuery;

/**
 *
 *
 * @author wcs
 * @date 2021-3-4
 */
public interface DocumentReleaseService {

    /**
     * 签收处理
     *
     * @param query 查找条件
     */
    List<DocumentReleaseBO> signInProcessing(DocumentReleaseQuery query);

    /**
     * 生效处理
     *
     * @param query 查找条件
     */
    List<DocumentReleaseBO> effectiveProcessing(DocumentReleaseQuery query);

    /**
     * 查找多个
     *
     * @param query 查找条件
     */
    List<DocumentReleaseBO> listDocumentRelease(DocumentReleaseQuery query);
    List<DocumentReleaseBO> listAllDocumentRelease(DocumentReleaseQuery query);
    /**
     * 查看签收情况
     *
     * @param request 查找条件
     */
    Result<?> DocumentReleaseCheck(GetDocumentReleaseCheckStatusRequest request);
    Result<?> getTrainByDocumentFlow(Long documentFlowId);

    /**
     * 查看签收情况
     *
     * @param documentReleaseIdS 查找条件
     */
    List<DocumentReleaseCheckBO> listDocumentReleaseCheck(Collection<Long> documentReleaseIdS);

    /**
     * 统计个数
     *
     * @param query 查找条件
     */
    int countDocumentRelease(DocumentReleaseQuery query);

    /**
     * 统计个数
     *
     * @param query 查找条件
     */
    int countAllDocumentRelease(DocumentReleaseQuery query);

    /**
     * 生效开关打开
     *
     * @param query
     */
    Result<?> takeEffectDocumentRelease(DocumentReleaseQuery query);

    /**
     * 生效开关关闭
     *
     * @param query
     */
    Result<?> loseEffectDocumentRelease(DocumentReleaseQuery query);

    /**
     * 文件增加发放对象
     *
     * @param request
     */
    Result<?> addDocumentReleaseReceive(SaveDocumentReleaseReceiveRequest request);

    Result<?> reallocate(Collection<String> collection);

    /**
     * 现行文件生效
     *
     * @param query 查找条件
     */
    Result<?> takeEffectFlagDocumentRelease(DocumentReleaseQuery query);

    /**
     * 现行文件失效
     *
     * @param query
     */
    Result<?> loseEffectFlagDocumentRelease(DocumentReleaseQuery query);

    /**
     * 签收发行文档
     * @param documentReleaseId
     * @return
     */
    Result<?> signForDocument(Long documentReleaseId);

    /**
     * 批量签收发行文档
     * @param request
     * @return
     */
    Result<?> signForDocumentBatch(SignDocumentReleaseRequest request);

    /**
     * 获取发行文件
     * @param request
     * @return
     */
    Result<?> getRelease(ListFolderRequest request);

    /**
     * 获取发行文件
     * @param documentReleaseId
     * @return
     */
    DocumentReleaseBO getDocumentRelease(Long documentReleaseId);

    /**
     * 通过文件属性获取文件
     * @param request
     * @return
     */
    Result<?> getDocumentListByType(ListDocumentByTypeRequest request);

    /**
     * 更新发行状态
     *
     */
    Result<?> changeStatus();
}
